/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tetris.model.blokken;

import java.awt.Color;

/**
 *
 * @author Batist Leman
 */
public class AbstractBlok implements Cloneable{
    
    private Color kleur;
    
    protected int aantalPosities;
    protected boolean matrix[][][];   
    protected int huidigePositie;
        
    public void toggle(){
        huidigePositie = (huidigePositie+1)%aantalPosities;
    }
    
    public boolean[][] returnBlok(){
        return matrix[huidigePositie];
    }
    
    @Override
    public AbstractBlok clone(){
        try {
            return (AbstractBlok) super.clone();
        } catch (CloneNotSupportedException ex) {
            return null;
        }
    }

    public void setKleur(Color kleur) {
        this.kleur = kleur;
    }
    
    public Color getKleur() {
        return kleur;
    }
}
